import { defineConfig } from '@ice/app';
import jsxPlus from '@ice/plugin-jsx-plus';

const minify = process.env.NODE_ENV === 'production' ? 'swc' : false;

// 文档：https://v3.ice.work/docs/guide/basic/config
export default defineConfig(() => ({
  minify,
  ssr: false,
  ssg: false,
  plugins: [jsxPlus()],
  codeSplitting: 'page-vendors',
  publicPath: '/fit/',
  server: { format: 'esm', onDemand: true },
  routes: {
    // 忽略 src/pages 下所有 components 目录
    ignoreFiles: ['**/components/**', '**/common/**', '**/interface.ts?(x)'],
  },
}));
